<!DOCTYPE html>
<title>media controls picture in picture button for a video element with only audio</title>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../media-file.js"></script>
<script src="../../media-controls.js"></script>
<script src="../utils.js"></script>
<body>
<video controls></video>
<script>
async_test(t => {
  enablePictureInPictureForTest(t);

  var video = document.querySelector("video");
  video.src = '../../content/test.wav';

  video.onloadedmetadata = t.step_func(function() {
    assert_false(isPictureInPictureButtonEnabled(video), "button should not be visible.");
  });

  video.onloadeddata = t.step_func_done(function() {
    assert_false(isPictureInPictureButtonEnabled(video), "button should not be visible.");
  });
});
</script>
</body>